﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Subtle.Domain.Models;

namespace Subtle.Domain.Services.Interfaces
{
	/// <summary>
	/// Post Service
	/// </summary>
	public interface IPostService
	{
		/// <summary>
		/// Create Post
		/// </summary>
		/// <param name="post"></param>
		/// <returns></returns>
		bool SavePost(Post post);

		/// <summary>
		/// Get Post
		/// </summary>
		/// <param name="postID"></param>
		/// <returns></returns>
		Post GetPost(int postID);

		/// <summary>
		/// Get Posts
		/// </summary>
		/// <param name="year"></param>
		/// <param name="month"></param>
		/// <returns></returns>
		IList<Post> GetPosts(int year, int month);

		/// <summary>
		/// Get Post
		/// </summary>
		/// <param name="linkTitle"></param>
		/// <returns></returns>
		Post GetPost(string linkTitle);

		/// <summary>
		/// Get Latest Published Posts
		/// </summary>
		/// <param name="numberOfPosts"></param>
		/// <returns></returns>
		IList<Post> GetLatestPublishedPosts(int numberOfPosts);

		/// <summary>
		/// Get Archives
		/// </summary>
		/// <returns>Dictionary of Archives, the content being DateTime</returns>
		IDictionary<DateTime, int> GetArchives();

		/// <summary>
		/// Get Category
		/// </summary>
		/// <param name="categoryDescription"></param>
		/// <returns></returns>
		Category GetCategory(string categoryDescription);

		/// <summary>
		/// Get Categories
		/// </summary>
		/// <returns></returns>
		Category[] GetCategories();

		/// <summary>
		/// Create Category
		/// </summary>
		/// <param name="description"></param>
		/// <returns></returns>
		bool CreateCategory(string description);

		/// <summary>
		/// Get Tag
		/// </summary>
		/// <param name="tagDescription"></param>
		/// <returns></returns>
		Tag GetTag(string tagDescription);

		/// <summary>
		/// Get Tags
		/// </summary>
		/// <returns></returns>
		Tag[] GetTags();

		/// <summary>
		/// Create Tag
		/// </summary>
		/// <param name="description"></param>
		/// <returns></returns>
		bool CreateTag(string description);

		/// <summary>
		/// Delete Post
		/// </summary>
		/// <param name="post"></param>
		/// <returns></returns>
		bool DeletePost(Post post);
	}
}
